import { RouteRecordRaw } from "vue-router";
//由于router的API默认使用了类型进行初始化，内部包含类型定义，所以本文内部代码中的所有数据类型是可以省略的
//RouterRecordRaw是路由组件对象
export const routes: RouteRecordRaw[] = [
  // 动态路由引入
  { path: "/", name: "home", component: () => import("@/views/home/home.vue") },
  {
    path: "/about",
    name: "about",
    component: () => import("@/views/about/about.vue"),
  },
  {
    path: "/404",
    name: "NotFound",
    component: () => import("@/views/ErrorPage/ErrorPage.vue"),
  },
  { path: "/:pathMatch(.*)", redirect: "/404" },
];
